#include "widget.h"
#include "ui_widget.h"
#include <QLabel>
#include <QString>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    //new出标签并且挂载到对象树上
    QLabel* label = new QLabel(this);
    //QString == string
    QString info = "hello word!";
    label->setText(info);
}

Widget::~Widget()
{
    delete ui;
}

